package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.service.IBilliardsMemberAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BilliardsMemberMapper;
import com.ruoyi.system.domain.BilliardsMember;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-10
 */
@Service
public class BilliardsMemberAdminServiceImpl implements IBilliardsMemberAdminService
{
    @Autowired
    private BilliardsMemberMapper billiardsMemberMapper;

    /**
     * 查询用户信息
     * 
     * @param memberId 用户信息主键
     * @return 用户信息
     */
    @Override
    public BilliardsMember selectBilliardsMemberByMemberId(Long memberId)
    {
        return billiardsMemberMapper.selectBilliardsMemberByMemberId(memberId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param billiardsMember 用户信息
     * @return 用户信息
     */
    @Override
    public List<BilliardsMember> selectBilliardsMemberList(BilliardsMember billiardsMember)
    {
        return billiardsMemberMapper.selectBilliardsMemberList(billiardsMember);
    }

    /**
     * 新增用户信息
     * 
     * @param billiardsMember 用户信息
     * @return 结果
     */
    @Override
    public int insertBilliardsMember(BilliardsMember billiardsMember)
    {
        billiardsMember.setCreateTime(DateUtils.getNowDate());
        return billiardsMemberMapper.insertBilliardsMember(billiardsMember);
    }

    /**
     * 修改用户信息
     * 
     * @param billiardsMember 用户信息
     * @return 结果
     */
    @Override
    public int updateBilliardsMember(BilliardsMember billiardsMember)
    {
        billiardsMember.setUpdateTime(DateUtils.getNowDate());
        return billiardsMemberMapper.updateBilliardsMember(billiardsMember);
    }

    /**
     * 批量删除用户信息
     * 
     * @param memberIds 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteBilliardsMemberByMemberIds(Long[] memberIds)
    {
        return billiardsMemberMapper.deleteBilliardsMemberByMemberIds(memberIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param memberId 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteBilliardsMemberByMemberId(Long memberId)
    {
        return billiardsMemberMapper.deleteBilliardsMemberByMemberId(memberId);
    }
}
